package com.woniuxy.lrz.carlproject.dao;

import com.woniuxy.lrz.carlproject.model.OrderInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.lrz.carlproject.service.dto.orderDto.OrderGoodInfoDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 订单详情表 Mapper 接口
 * </p>
 *
 * @author lrz
 * @since 2022-09-28
 */
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {

    @Select("select oi.*,gs.sku_property from order_info oi join good_sku gs on oi.sku_id=gs.sku_id where oi.user_order_id = #{orderId} ")
    List<OrderGoodInfoDTO> searchGoodDetails(@Param("orderId") Integer userOrderId);
}
